<%@ page import="com.zafu.dao.AccountBean" %>
<%@ page import="com.zafu.entity.AccountInfo" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Iterator" %>
<%--
  Created by IntelliJ IDEA.
  User: 86189
  Date: 2024/12/11
  Time: 18:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  AccountBean bean = new AccountBean();
  ArrayList<AccountInfo> data = bean.GetAll();
  StringBuilder builder = new StringBuilder();
  out.println("<Accounts>");
  Iterator<AccountInfo> iter = data.iterator();
  while (iter.hasNext()){
    AccountInfo info = iter.next();
    builder.append(info.toString()).append("\n");

    out.println("<Account>");
    out.println("<phone>" + info.getPhone() + "</phone>");
    out.println("<password>" + info.getPassword() + "</password>");
    out.println("<name>" + info.getName() + "</name>");
    out.println("<people_name>" + info.getPeople_name() + "</people_name>");
    out.println("<head_image>" + info.getHead_image() + "</head_image>");
    out.println("<introduction>" + info.getIntroduction() + "</introduction>");
    out.println("</Account>");
  }
  out.println("</Accounts>");
  System.out.printf(builder.toString());
%>

